<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%String path = request.getContextPath();%>
<script type="text/javascript" src="<%=path%>/projectjs/ImageFileUpload.js"></script>
<script type="text/javascript">
function setActiveVOValue(obj) {
	if (!iu1.validate()) {
		alert("您还有像素为：【"+iu1.need_add_pic_pixel.join(",")+"】的图片要添加，请添加图片！");
		iu1.openAddImgFrame();
		return false;
	}
	if ($("#active_add_inp_customerName").val()==""){
		alert($("#active_add_inp_customerName").attr("tit"));
		$("#a_link_id_look_1").click();
		return false;
	}
	$("#active_add_inp_customerName").attr("name","");
	return validateCallback(obj, navTabAjaxDone);
}
</script>
	<div class="pageContent">
		<form method="post" action="<%=path%>/active/saveActive.action" class="pageForm required-validate" onsubmit="return setActiveVOValue(this);">
			<div class="pageFormContent" layoutH="56">
				<p>
					<label>活动标题：</label>
					<input type="text" name="activeVO.title" class="required" alt="请输入活动标题" size="30"/>
				</p>
				<p>
					<label>是否置顶：</label>
					<input type="radio" name="activeVO.top" value="1"/>是
					<input type="radio" name="activeVO.top" value="0" checked="checked"/>否
				</p>
				<p>
					<label>开始时间：</label>
					<input type="text" name="activeVO.startTime" class="date required" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true"/>
					<a class="inputDateButton" href="javascript:;">选择</a>
				</p>
				<p>
					<label>结束时间：</label>
					<input type="text" name="activeVO.endTime" class="date required" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true"/>
					<a class="inputDateButton" href="javascript:;">选择</a>
				</p>
				<p style="width: 96%">
					<label>活动商家：</label>
					<input type="hidden" value="${SESSION_USER.customer==null?'':(SESSION_USER.customer.id)}" name="activeVO.customerId"/>
					<input id="active_add_inp_customerName" name="activeVO.customerName" value="${SESSION_USER.customer==null?'':(SESSION_USER.customer.name)}" type="text" style="width:200px" readonly="readonly" tit="请选择活动商家！"/>
					<c:if test="${SESSION_USER.customer==null}">
					<a id="a_link_id_look_1" class="btnLook" href="<%=path%>/customer/listCustomer.action?searchType=active" lookupGroup="activeVO"></a>
					</c:if>
				</p>
				<p>
					<label>是否热门：</label>
					<input type="radio" name="activeVO.is_hot" value="1"/>是
					<input type="radio" name="activeVO.is_hot" value="0" checked="checked"/>否
				</p>
				<p>
					<label>是否推荐：</label>
					<input type="radio" name="activeVO.is_recommend" value="1"/>是
					<input type="radio" name="activeVO.is_recommend" value="0" checked="checked"/>否
				</p>
				<p style="width: 96%">
					<label>活动说明：</label>
					<textarea name="activeVO.instruction" cols="80" rows="5" class="required"></textarea>
				</p>
				<p></p>
				<p></p>
				<p></p>
				<p></p>
				<p></p>
				<p></p>
				<p style="width: 96%">
					<label>活动介绍：</label>
					<textarea name="activeVO.description" cols="80" rows="5" class="required"></textarea>
				</p>
				<div class="divider" style="border:0;height:70px"></div>
				<p>
					<label>活动图片：</label>
					<a class="button" onclick="openAddImgFrame(1);"><span>添加图片</span></a>
					<a id="add_pic_a_id1" class="btnAttach" href="<%=path%>/jsp/common/image_file_upload.jsp" lookupGroup="" width="560" height="300" style="display: none"></a>
					<div class="divider" style="border:0"></div>
					<div id="pic_need_add_pixel_div1"></div>
					<div class="divider" style="border:0"></div>
					<div id="pic_content_div1" style="float: none;width:auto;padding-left: 150px;"></div>
				</p>
			</div>
			<div class="formBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
					<li>
						<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
					</li>
				</ul>
			</div>
		</form>
	</div>
<script type="text/javascript">
var iu1 = new ImageUpload("","active","1","${pageContext.request.contextPath}","activeVO.picName");
</script>